package project.active;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;

import approve.action.R;

public class L_list_subprolistmenu extends BaseAdapter implements OnItemClickListener {
	private Context context;
	String[] lstmenu;
	
	public L_list_subprolistmenu(Context context1,String[] lstem1){
		this.context=context1;
		this.lstmenu=lstem1;
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return lstmenu.length;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return lstmenu[position];
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		
		final String adpr = lstmenu[position];
		if(convertView==null){
			LayoutInflater inflater=(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			convertView=inflater.inflate(R.layout.l_list_subprolistmenu, null);
		}
		
		TextView tvproname=(TextView)convertView.findViewById(R.id.ad_l_tv_prosubname);
		tvproname.setText(adpr);
		return convertView;
	}

	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
		// TODO Auto-generated method stub
		
	}

}
